using System;
using System.Collections.Generic;
using System.Text;
using ControladorDifuso.Normas;

namespace ControladorDifuso.Normas
{
    public class FabricaNormas
    {
        String [] normas = new String[7];
        public String[] Normas
        {
            get { return this.normas; }
        }
        public FabricaNormas()
        {
            this.normas[0] = "Bandley and Kohout";
            this.normas[1] = "Dombi";
            this.normas[2] = "Dubois and Prade";
            this.normas[3] = "Hamacher";
            this.normas[4] = "Lukasiewicz";
            this.normas[5] = "Weber";
            this.normas[6] = "Zadeh";
        }
        public Norma CrearS_Norma(string n, decimal a)
        {
            switch (n)
            {
                case "Bandley and Kohout":
                    return new Normas.S_Normas.Bandley_Kokout();
                case "Dombi":
                    Normas.S_Normas.Dombi dombi = new Normas.S_Normas.Dombi();
                    dombi.Lamda = a;
                    return dombi;
                case "Dubois and Prade":
                    Normas.S_Normas.Dubois_Prade dubois = new Normas.S_Normas.Dubois_Prade();
                    dubois.Alfa = a;
                    return dubois;
                case "Hamacher":
                    Normas.S_Normas.Hamacher hamacher = new Normas.S_Normas.Hamacher();
                    hamacher.Gamma = a;
                    return hamacher;
                case "Lukasiewicz":
                    return new Normas.S_Normas.Lukasiewicz();
                case "Weber":
                    Normas.S_Normas.Weber weber = new Normas.S_Normas.Weber();
                    weber.Lambda = a;
                    return weber;
                case "Zadeh":
                    return new Normas.S_Normas.Zadeh();
            }
            return null;
        }

        public Norma CrearT_Norma(string n, decimal a)
        {
            switch (n)
            {
                case "Bandley and Kohout":
                    return new Normas.T_Normas.Bandler_Kohout();
                case "Dombi":
                    Normas.T_Normas.Dombi dombi = new Normas.T_Normas.Dombi();
                    dombi.Lamda = a;
                    return dombi;
                case "Dubois and Prade":
                    Normas.T_Normas.Dubois_Prade dubois = new Normas.T_Normas.Dubois_Prade();
                    dubois.Alfa = a;
                    return dubois;
                case "Hamacher":
                    Normas.T_Normas.Hamacher hamacher = new Normas.T_Normas.Hamacher();
                    hamacher.Gamma = a;
                    return hamacher;
                case "Lukasiewicz":
                    return new Normas.T_Normas.Lukasiewicz();
                case "Weber":
                    Normas.T_Normas.Weber weber = new Normas.T_Normas.Weber();
                    weber.Lambda = a;
                    return weber;
                case "Zadeh":
                    return new Normas.T_Normas.Zadeh();
            }
            return null;
        }
    }
}
